<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../vue.js"></script>
</head>

<body>
    <div id="app">
        <div v-if="flag">000</div>
        <div v-show="flag">0000000</div>
        <div v-if="age<18">未成年</div>
        <div v-else-if="age<50">成年</div>
        <div v-else>老年</div>
    </div>
</body>
<script>
    const vm = new Vue({
        el: '#app',
        data: {
            flag: true,
            age: 51
        },
        methods: {

        }
    })
</script>

</html>